﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IBLL;

namespace KPIS.GERP.GHRMS.BLL
{
    public class RecruitCatalogBLL
    {
        RecruitCatalogDAL DAL = new RecruitCatalogDAL();

        public DataSet LoadCatalogs(Nullable<int> Sequence, Nullable<int> EmployeeType, Nullable<int> bgYear, Nullable<int> EntType)
        {
            return DAL.LoadCatalogs(Sequence, EmployeeType, bgYear, EntType);
        }
        public DataSet LoadCatalogDtls(Nullable<int> Sequence, Nullable<int> CatalogSeq, Nullable<int> EmployeeStatus)
        {
            return DAL.LoadCatalogDtls(Sequence, CatalogSeq, EmployeeStatus);
        }
        public DataSet LoadCatalogDtlsStatus()
        {
            return DAL.LoadCatalogDtlsStatus();
        }
        public void Insert(int bgYear, string Period, string Name, Nullable<int> EmployeeType, string Remarks, int CreatedBy)
        {
            try
            {
                DAL.Insert(bgYear, Period, Name, EmployeeType, Remarks, CreatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
        public void Update(int Sequence, int bgYear, string Period, string Name, Nullable<int> EmployeeType, string Remarks, int UpdatedBy)
        {
            try
            {
                DAL.Update(Sequence, bgYear, Period, Name, EmployeeType, Remarks, UpdatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
        public void Delete(int Sequence, int UpdatedBy)
        {
            try
            {
                DAL.Delete(Sequence, UpdatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
        public void InsertDtls(int CatalogSeq, int No, Nullable<int> CatStatusSeq, Nullable<int> TmpEmpSeq, Nullable<int> FieldPosSeq, string Remarks, int CreatedBy)
        {
            try
            {
                DAL.InsertDtls(CatalogSeq, No, CatStatusSeq, TmpEmpSeq, FieldPosSeq, Remarks, CreatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
        public void UpdateDtls(int Sequence, int CatalogSeq, int No, Nullable<int> CatStatusSeq, Nullable<int> TmpEmpSeq, Nullable<int> FieldPosSeq, string Remarks, int UpdatedBy)
        {
            try
            {
                DAL.UpdateDtls(Sequence, CatalogSeq, No, CatStatusSeq, TmpEmpSeq, FieldPosSeq, Remarks, UpdatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
        public void DeleteDtls(int Sequence, int UpdatedBy)
        {
            try
            {
                DAL.DeleteDtls(Sequence, UpdatedBy);
            }
            catch
            {
                throw new Exception("");
            }
        }
    }
}
